# -!- coding: utf-8 -!-
# @FileName  :utils.py
# @Time      :2020/10/25 14:59
# @Author    :zhoujirong

from common.http_request import Request
from biz.support.urls import ServerUrl

class PerAsynCheckRequest:
    @classmethod
    def per_receive_task_getpage(cls,curPage,
                                    maxSize,
                                    search_EQ_clientName,
                                    search_EQ_certType,
                                    search_EQ_certNo,
                                    search_EQ_qryReason,
                                    search_EQ_status,
                                    search_EQ_operator,
                                    search_EQ_operOrg,
                                    search_GTE_LTE_operTime_DATE_RANGE,
                                    search_EQ_operOrgRange,
                                    search_EQ_queryFormat,cookie):
        data = {
            'curPage':curPage,
            'maxSize':maxSize,
            'search_EQ_clientName':search_EQ_clientName,
            'search_EQ_certType':search_EQ_certType,
            'search_EQ_certNo':search_EQ_certNo,
            'search_EQ_qryReason':search_EQ_qryReason,
            'search_EQ_status':search_EQ_status,
            'search_EQ_operator':search_EQ_operator,
            'search_EQ_operOrg':search_EQ_operOrg,
            'search_GTE_LTE_operTime_DATE_RANGE':search_GTE_LTE_operTime_DATE_RANGE,
            'search_EQ_operOrgRange':search_EQ_operOrgRange,
            'search_EQ_queryFormat':search_EQ_queryFormat
        }
        req = Request(ServerUrl.per_receive_task_getpage_url,params=data,headers=cookie)
        return req.get()

    @classmethod
    def per_checkinfo_receivetask(cls,ids,cookie):
        data = {
            'ids':ids
        }
        req = Request(ServerUrl.per_receive_task_url,data=data,headers=cookie)
        return req.post()


    @classmethod
    def get_page(cls,curPage,maxSize,
                        search_EQ_clientName,
                        search_EQ_certType,
                        search_EQ_certNo,
                        search_EQ_qryReason,
                        search_EQ_status,
                        search_EQ_operator,
                        search_EQ_operOrg,
                        search_GTE_LTE_operTime_DATE_RANGE,
                        search_EQ_archiveViewStatus,
                        cookie):
        data = {
            'curPage':curPage,
            'maxSize':maxSize,
            'search_EQ_clientName':search_EQ_clientName,
            'search_EQ_certType':search_EQ_certType,
            'search_EQ_certNo':search_EQ_certNo,
            'search_EQ_qryReason':search_EQ_qryReason,
            'search_EQ_status':search_EQ_status,
            'search_EQ_operator':search_EQ_operator,
            'search_EQ_operOrg':search_EQ_operOrg,
            'search_GTE_LTE_operTime_DATE_RANGE':search_GTE_LTE_operTime_DATE_RANGE,
            'search_EQ_archiveViewStatus':search_EQ_archiveViewStatus
        }
        req = Request(ServerUrl.per_asyn_getpage_url,params=data,headers=cookie)
        return req.get()

    @classmethod
    def per_select_archive(cls,checkId,cookie):
        data = {
            'checkId':checkId
        }
        req = Request(ServerUrl.per_select_archive_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def per_pass(cls,archiveType,clientName,creatTime,creator,cretNo,cretType,
                    expireDate,ext1,ext2,ext3,ext4,ext5,ext6,extendDate,id,note,
                    operTime,operationIdentifier,operator,operorg,ownorg,quantity,
                    queryNum,remarks,reqId,resCode,resMsg,serialNumber,startDate,
                    status,ids,cookie):
        data = {
            'archiveType':archiveType,
            'clientName':clientName,
            'creatTime':creatTime,
            'creator':creator,
            'cretNo':cretNo,
            'cretType':cretType,
            'expireDate':expireDate,
            'ext1':ext1, 'ext2':ext2,
            'ext3':ext3, 'ext4':ext4,
            'ext5':ext5, 'ext6':ext6,
            'extendDate':extendDate,
            'id':id,
            'note':note,
            'operTime':operTime,
            'operationIdentifier':operationIdentifier,
            'operator':operator,
            'operorg':operorg,
            'ownorg':ownorg,
            'quantity':quantity,
            'queryNum':queryNum,
            'remarks':remarks,
            'reqId':reqId,
            'resCode':resCode,
            'resMsg':resMsg,
            'serialNumber':serialNumber,
            'startDate':startDate,
            'status':status,
            'ids':ids
        }
        req = Request(ServerUrl.per_check_pass_url,data=data,headers=cookie)
        return req.post()
    @classmethod
    def per_check_pass(cls,id,cookie):
        data = {
            'id':id
        }
        req = Request(ServerUrl.per_check_pass_url,data=data,headers=cookie)
        return req

    @classmethod
    def per_check_refuse(cls,id,refuseReasons,cookie):
        data = {
            'id':id,
            'refuseReasons':refuseReasons
        }
        req = Request(ServerUrl.per_check_refusal_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def per_check_back(cls,archiveId,
                    archiveViewStatus,
                    assocbsnssData,
                    certNo,certType,
                    checkinfoId,clientIp,
                    clientName,creditUser,
                    ext1,ext2,ext3,
                    ext4,ext5,ext6,
                    id,note,operOrg,
                    operTime,operator,
                    president,qryReason,
                    queryFormat,queryTime,
                    queryType,reason,
                    refuseReasons,rekOrg,
                    rekTime,rekType,
                    rekUser,remarks,
                    reqId,resCode,
                    resMsg,resultStatus,
                    resultType,serialNumber,
                    source,status,cookie):
        data = {
                    'archiveId':archiveId,
                    'archiveViewStatus':archiveViewStatus,
                    'assocbsnssData':assocbsnssData,
                    'certNo':certNo,
                    'certType':certType,
                    'checkinfoId':checkinfoId,
                    'clientIp':clientIp,
                    'clientName':clientName,
                    'creditUser':creditUser,
                    'ext1':ext1,
                    'ext2':ext2,
                    'ext3':ext3,
                    'ext4':ext4,
                    'ext5':ext5,
                    'ext6':ext6,
                    'id':id,
                    'note':note,
                    'operOrg':operOrg,
                    'operTime':operTime,
                    'operator':operator,
                    'president':president,
                    'qryReason':qryReason,
                    'queryFormat':queryFormat,
                    'queryTime':queryTime,
                    'queryType':queryType,
                    'reason':reason,
                    'refuseReasons':refuseReasons,
                    'rekOrg':rekOrg,
                    'rekTime':rekTime,
                    'rekType':rekType,
                    'rekUser':rekUser,
                    'remarks':remarks,
                    'reqId':reqId,
                    'resCode':resCode,
                    'resMsg':resMsg,
                    'resultStatus':resultStatus,
                    'resultType':resultType,
                    'serialNumber':serialNumber,
                    'source':source,
                    'status':status
        }
        req = Request(ServerUrl.per_back_task_url,data=data,headers=cookie)
        return req.post()





if __name__ == "__main__":
    pass